<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" template="/template/template.xhtml"
	xmlns:s="http://sduept.security.el/func">
	<ui:define name="head">
	
<style type="text/css">

.ui-datatable-scrollable-header-box {
    margin-left: 0px;
    margin-right: 15px !important;
}

</style>

	</ui:define>
	<ui:define name="content">
		<p:confirmDialog global="true" showEffect="fade" hideEffect="fade">
			<p:commandButton value="是" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
			<p:commandButton value="否" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
		</p:confirmDialog>
		<div id="headDiv" class="box box-solid with-border">
			<h:form id="headForm">
				<div class="box-header" id="queryDiv">
					<p:outputLabel value="消息创建时间：" style="margin-left:5px;" />
					<p:calendar id="popup1" navigator="true" size="15" value="#{alarmMessageCheckController.queryDateStart}"
						pattern="yyyy-MM-dd" maxdate="Date()">
					</p:calendar>
					<p:outputLabel for="popup2" value="至 " style="margin-right:5px;margin-left:5px;" />
					<p:calendar id="popup2" navigator="true" size="15" value="#{alarmMessageCheckController.queryDateEnd}"
						pattern="yyyy-MM-dd" maxdate="Date()">
					</p:calendar>
					<p:outputLabel value="是否确认：" style="margin-left:10px;"/>
					<h:selectOneMenu value="#{alarmMessageCheckController.checkState}"
						style="width:100px;margin-right:10px;height:30px" id="checkState">
						<f:selectItem itemLabel="全部" itemValue="all" />
						<f:selectItem itemLabel="未确认" itemValue="false" />
						<f:selectItem itemLabel="已确认" itemValue="true" />
					</h:selectOneMenu>
					<p:commandButton value="查询" actionListener="#{alarmMessageCheckController.query}" oncomplete="closeSelectDiv();"
						update="form:dataTb headForm:checkedBtn" icon="ui-icon-search">
					</p:commandButton>
					<p:commandButton icon="ui-icon-refresh" value="重置"  oncomplete="closeSelectDiv();"
						actionListener="#{alarmMessageCheckController.resetQuery}" style="margin-left:5px;" 
						update="messageContet messageType popup1 popup2 checkState btnBar form:dataTb msgStateQuery"/>
					<div class="box-tools pull-right">
						<button type="button" id="selectButton" title="高级查询" class="btn btn-default"
							onclick="onSelectDivClick();" style="margin-right: 50px;">
							<span id="selectButtonIcon" class="fa fa-caret-down">高级查询</span>
						</button>
					</div>
				</div>
				<div class="panel-collapse collapse" id="selectDiv">
					<p:outputLabel value="消息内容：" style="margin-left:15px;" />
					<p:inputText id="messageContet" value="#{alarmMessageCheckController.contentQuery}"/>
					<p:outputLabel value="消息类型：" style="margin-left:10px;"/>
					<h:selectOneMenu value="#{alarmMessageCheckController.typeQuery}" id="messageType"
						style="width:150px;height:30px;margin-right:10px;">
						<f:selectItem itemLabel="全部" itemValue="" />
						<f:selectItems var="item" itemLabel="#{item.description}" itemValue="#{item.id}" value="#{alarmMessageCheckController.msgTypes}" />
					</h:selectOneMenu>
					<p:outputLabel value="消息状态："/>
					<h:selectOneMenu id="msgStateQuery" value="#{alarmMessageCheckController.msgStatusQuery}"
						style="width:130px;height:30px">
						<f:selectItem itemLabel="全部" itemValue="" />
						<f:selectItem itemLabel="未过期" itemValue="0" />
						<f:selectItem itemLabel="已过期" itemValue="1" />
					</h:selectOneMenu>
				</div>
				<div id="toolbarDiv">
					<p:toolbar id="btnBar">
						<f:facet name="left">
							<p:commandButton value="新建" id="createBtn"
								rendered="#{s:hasPermission(session,'bhyx_ycgjclqk_xj')}"
								oncomplete="PF('editDlg').show()" 
								process="@this" actionListener="#{alarmMessageCheckController.preCreate()}"
								update="editForm:editDlgPanel checkedBtn" icon="fa fa-plus" />
							<p:commandButton value="编辑" id="editBtn"
								rendered="#{s:hasPermission(session,'bhyx_ycgjclqk_bj')}"
								disabled="#{alarmMessageCheckController.selectedChecks==null}"
								oncomplete="PF('editDlg').show()"
								process="@this" actionListener="#{alarmMessageCheckController.preEdit}"
								update="editForm:editDlgPanel checkedBtn" icon="fa fa-pencil" />
							<p:commandButton value="删除" id="delBtn"
								rendered="#{s:hasPermission(session,'bhyx_ycgjclqk_sc')}"
								disabled="#{alarmMessageCheckController.selectedChecks==null}"
								actionListener="#{alarmMessageCheckController.deleteById}"
								oncomplete="getTableScrollHeight();"
								update="form:msgs form:dataTb delBtn editBtn checkedBtn"
								icon="fa fa-trash">
								<p:confirm header="提示" message="确定要删除么？" icon="ui-icon-alert" />
							</p:commandButton>
							<p:commandButton value="置为已确认" id="checkedBtn"
								oncomplete="getTableScrollHeight();"
								rendered="#{s:hasPermission(session,'bhyx_ycgjclqk_zwyqr')}"
								disabled="#{alarmMessageCheckController.selectedChecks == null}"  process="@this"
								actionListener="#{alarmMessageCheckController.checkedByHand}" update="form:dataTb form:msgs editBtn delBtn checkedBtn"
								icon="ui-icon-contact">
								<p:confirm header="提示" message="确定要将本条数据置为已确认么？" icon="ui-icon-alert" />
							</p:commandButton>
						</f:facet>
					</p:toolbar>
				</div>
			</h:form>
		</div>
		<div id="infoDiv" class="box box-solid with-border">
			<h:form id="form">
				<p:growl id="msgs" showDetail="true" />
				<p:dataTable id="dataTb" var="messages" emptyMessage="无记录" rowIndexVar="ite" lazy="true"
					value="#{alarmMessageCheckController.model}" rowKey="#{messages.id}" rows="20" paginator="true"
					selection="#{alarmMessageCheckController.selectedChecks}" 
					paginatorTemplate="{left} {RowsPerPageDropdown} {right} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {Customer}"
					rowsPerPageTemplate="20,30,50" paginatorPosition="bottom" scrollable="true" >
					<p:ajax event="rowSelectCheckbox" update="headForm:btnBar" />
					<p:ajax event="rowUnselectCheckbox" update="headForm:btnBar" />
					<p:ajax event="rowSelect" update="headForm:btnBar" />
					<p:ajax event="rowUnselect" update="headForm:btnBar" />
					<f:facet name="{Customer}">
             			<p:outputLabel value="总计：#{alarmMessageCheckController.model.rowCount}条纪录" style="margin-left:20px" />
             		</f:facet>
					<f:facet name="{left}">
             			<p:outputLabel value="每页显示" />
             		</f:facet>
					<f:facet name="{right}">
             			<p:outputLabel value="条" style="margin-right:20px"/>
             		</f:facet>
             		<p:column selectionMode="multiple" style="text-align:center;" width="20" />
					<p:column headerText="序号" style="text-align:center;" width="20" >
						<h:outputText value="#{ite+1}" />
					</p:column>
					<p:column headerText="厂站名" width="50" >
						<h:outputText value="#{alarmMessageCheckController.getStationNameByCheck(messages)}" />
					</p:column>
					<p:column headerText="消息内容" width="120">
						<h:outputText value="#{messages.msgContent}" />
					</p:column>
					<p:column headerText="创建时间" width="50">
						<h:outputText value="#{messages.msgTime}">
							<f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss" />
						</h:outputText>
					</p:column>
					<p:column headerText="消息类型" width="70">
						<h:outputText value="#{alarmMessageCheckController.getDescriptionText(messages.msgType)}" />
					</p:column>
					<p:column headerText="变电站" width="70">
						<h:outputText value="#{alarmMessageCheckController.getAlarmByCheck(messages).stationName}" />
					</p:column>
					<p:column headerText="一次设备" width="70">
						<h:outputText value="#{alarmMessageCheckController.getAlarmByCheck(messages).primaryName}" />
					</p:column>
					<p:column headerText="二次设备" width="70">
						<h:outputText value="#{alarmMessageCheckController.getAlarmByCheck(messages).secondaryName}" />
					</p:column>
					<p:column headerText="检查情况" width="70">
						<h:outputText value="#{messages.checkResult}" />
					</p:column>
					<p:column headerText="检查人员" width="50">  
						<h:outputText value="#{messages.checker}" />
					</p:column>
					<p:column headerText="检查时间" width="50">
						<h:outputText value="#{messages.checkTime}" >
							<f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss" />
						</h:outputText>
					</p:column>
					<p:column headerText="是否确认" width="40">
						<h:outputText value="#{alarmMessageCheckController.getCheckedStatus(messages.isChecked)}" />
					</p:column>
					<p:column headerText="附件" selectRow="false" width="70">
						<p:rowExpansion>
							<p:repeat value="#{alarmMessageCheckController.getAlarmAttachments(messages.id)}" var="file"  rendered="#{alarmMessageCheckController.getAlarmAttachments(messages.id).size() != 0}" >
								<div class="row" style="padding-left: 10px;">
									<p:commandLink oncomplete="downloadFunc()"
										actionListener="#{alarmMessageCheckController.fileDownloadView(file.id)}"
										style="word-break:break-all;margin-right:5px;float:left;" update="downloadForm:fileExist form:msgs">
										<span>#{file.description}</span>
									</p:commandLink>
									<p:commandLink title="删除" style="margin-right:5px;float:left;"
										styleClass="ui-icon ui-icon-trash" update="form:dataTb form:msgs"
										actionListener="#{alarmMessageCheckController.removeFile(file)}" oncomplete="getTableScrollHeight();">
										<p:confirm header="提示" message="确定删除该记录吗?" icon="ui-icon-alert" />
									</p:commandLink>
									<p:commandLink title="下载" oncomplete="downloadFunc()"
										styleClass="ui-icon ui-icon-arrowthick-1-s"
										actionListener="#{alarmMessageCheckController.fileDownloadView(file.id)}"
										style="margin-right:5px;float:left;" update="downloadForm:fileExist form:msgs">
									</p:commandLink>
								</div>
							</p:repeat>
							<p:commandLink style="color:blue;text-decoration:underline" onclick="PF('fileUpLoadDlg').show()"
								actionListener="#{alarmMessageCheckController.preUpLoadFile(messages.id)}">
								<h:outputText value="上传附件" />
							</p:commandLink>
						</p:rowExpansion>
					</p:column>
					<p:column style="text-align: center;" width="20">
						<p:commandLink style="color:red;text-decoration:underline" 
							onclick="openDetailPage('#{messages.msgType}','#{alarmMessageCheckController.getAlarmByCheck(messages).source}','#{messages.msgId}')">
							<h:outputText value="详情" />
						</p:commandLink>
					</p:column>
				</p:dataTable>
			</h:form>
			<h:form id="fileUploadForm">
				<p:dialog header="上传附件" height="300" width="600" modal="true" widgetVar="fileUpLoadDlg" resizable="true" dynamic="true" id="fileUpLoadDlg">
					<p:fileUpload label="选择" multiple="true" uploadLabel="上传" cancelLabel="取消" 
						style="margin-top:10px" fileUploadListener="#{alarmMessageCheckController.handleFileUpload}"
						mode="advanced" oncomplete="upLoadFile();" update="form:dataTb form:msgs" />
				</p:dialog>
				<p:dialog widgetVar="repeatDlg" id="repeatDlg" header="提示" modal="true" width="400">
						<p:outputLabel value="文件已存在，是否替换？" style="margin-left:30px;" />
						<p></p>
						<p:commandButton actionListener="#{alarmMessageCheckController.replaceFile}"
							oncomplete="PF('repeatDlg').hide()"  value="确定" style="margin-left:30px;margin-top:10px;" />
						<p:commandButton oncomplete="PF('repeatDlg').hide()" value="取消" style="margin-top:10px;margin-left:20px;" update="repeatDlg" actionListener="#{alarmMessageCheckController.cancelReplaceFile}"/>
				</p:dialog>
			</h:form>
			<!-- 为了在下载之前判断文件是否存在，所以将下载过程截开，用js判断存在后，再下载。若不存在，则弹出提示框。 -->
			<h:form id="downloadForm">
				<p:outputLabel style="display:none;" id="fileExist" value="#{alarmMessageCheckController.fileExist}" />
				<p:commandButton ajax="false" id="downloadBtn" style="display:none;">
					<p:fileDownload value="#{alarmMessageCheckController.file}" />
				</p:commandButton>
			</h:form>
			<h:form id="editForm">
				<p:dialog widgetVar="editDlg" modal="true" id="editDlg" width="800" height="500"
					header="告警消息管理" >
					<p:toolbar>
						<f:facet name="left">
							<p:commandButton value="保存" style="float: right;" icon="fa fa-floppy-o"
								update="form:dataTb form:msgs headForm:delBtn headForm:editBtn headForm:checkedBtn editForm:editDlg"
								actionListener="#{alarmMessageCheckController.save()}" oncomplete="afterCreate();" />
						</f:facet>
					</p:toolbar>
					<p:outputPanel id="editDlgPanel" style="width:100%;" rendered="#{alarmMessageCheckController.selectedChecks.size()==1 or alarmMessageCheckController.selectedChecks==null}">
						<p:panelGrid style="width:100%">
							<p:row>
								<p:column style="width:120px;">
									<h:outputLabel value="消息类型" />
								</p:column>
								<p:column>
									<h:selectOneMenu value="#{alarmMessageCheckController.alarm.msgType}" 
										style="width:180px;margin-right:20px;height:30px">
										<p:ajax event="change" listener="#{alarmMessageCheckController.genMsgContent()}" update="content_id" />
										<f:selectItems var="item" itemLabel="#{item.description}" itemValue="#{item.id}" 
											value="#{alarmMessageCheckController.msgTypes}"/>
									</h:selectOneMenu>
								</p:column>
								<p:column>
									<h:outputLabel value="相关变电站" />
								</p:column>
								<p:column>
									<p:inputText id="selectStation" style="width:75%" readonly="true"
										value="#{alarmMessageCheckController.alarm.stationName}" />
									<p:commandButton value="选择" style="margin-left:5px" process="@this"
										actionListener="#{ledgerQueryDataController.getSubstaionSelectDialog()}" >
										<p:ajax event="dialogReturn" listener="#{alarmMessageCheckController.onSubstationChosen}"
											update="selectStation primary_id primaryBtn secondary_id secondaryBtn content_id" />
									</p:commandButton>
								</p:column>
							</p:row>
							<p:row>
								<p:column>
									<h:outputLabel value="一次设备" />
								</p:column>
								<p:column>
									<p:inputText id="primary_id" style="width:75%"
										readonly="#{alarmMessageCheckController.alarm.stationName==null}"
										value="#{alarmMessageCheckController.alarm.primaryName}" >
										<p:ajax event="valueChange" listener="#{alarmMessageCheckController.editPrimaryName()}" update="content_id" />
									</p:inputText>
									<p:commandButton disabled="#{alarmMessageCheckController.alarm.stationName==null}" value="选择" 
										actionListener="#{alarmMessageCheckController.initPrimaryTree}" id="primaryBtn"
										oncomplete="PF('primaryDialog').show()" update=":primaryForm" style="margin-left:5px" />
								</p:column>
								<p:column>
									<h:outputLabel value="二次设备" />
								</p:column>
								<p:column>
									<p:inputText id="secondary_id" style="width:75%" 
										readonly="#{alarmMessageCheckController.alarm.stationName==null}"
										value="#{alarmMessageCheckController.alarm.secondaryName}" >
										<p:ajax event="valueChange" listener="#{alarmMessageCheckController.editSecondaryName()}" update="content_id"/>
									</p:inputText>
									<p:commandButton disabled="#{alarmMessageCheckController.alarm.stationName==null}" value="选择" 
										actionListener="#{alarmMessageCheckController.initSecondaryTree}"
										oncomplete="PF('secondaryDialog').show()" update=":secondaryForm" style="margin-left:5px" id="secondaryBtn"/>
								</p:column>
							</p:row>
							<p:row>
								<p:column>
									<h:outputLabel value="消息内容:" />
								</p:column>
								<p:column colspan="4">
									<h:inputTextarea id="content_id" label="content" value="#{alarmMessageCheckController.alarm.content}"
										required="true" requiredMessage="消息内容为必填项" rows="5" style="width:100%"/>
								</p:column>
							</p:row>
							<p:row rendered="#{alarmMessageCheckController.alarmMsgCheck.id != null}">
								<p:column>
									<h:outputLabel value="分析结果:" />
								</p:column>
								<p:column colspan="4">
										<pre align="left"><p:outputLabel value="#{alarmMessageCheckController.alarmMsgCheck.analyseResult}" 
										rows="5" style="width:100%"/></pre>
								</p:column>
							</p:row>
							<p:row>
								<p:column>
									<h:outputLabel value="检查结果:" />
								</p:column>
								<p:column colspan="4">
									<h:inputTextarea label="content" value="#{alarmMessageCheckController.alarmMsgCheck.checkResult}"
										rows="5" style="width:100%"/>
								</p:column>
							</p:row>
							<p:row>
								<p:column>
									<h:outputLabel value="创建时间" />
								</p:column>
								<p:column>
									<p:calendar value="#{alarmMessageCheckController.alarm.createTime}" navigator="true" readonly="true"
										pattern="yyyy-MM-dd HH:mm:ss" required="true" requiredMessage="创建时间为必填项" />
								</p:column>
								<p:column>
									<h:outputLabel value="检查时间" />
								</p:column>
								<p:column>
									<p:calendar value="#{alarmMessageCheckController.alarmMsgCheck.checkTime}" navigator="true"
										pattern="yyyy-MM-dd HH:mm:ss" />
								</p:column>
							</p:row>
							<p:row>
								<p:column>
									<h:outputLabel value="检查人员:" />
								</p:column>
								<p:column>
									<p:inputText value="#{alarmMessageCheckController.alarmMsgCheck.checker}"/>
								</p:column>
								<p:column>
									<h:outputLabel value="是否确认：" />
								</p:column>
								<p:column>
									<h:selectOneMenu value="#{alarmMessageCheckController.alarmMsgCheck.isChecked}" 
										style="width:180px;margin-right:20px;height:30px">
										<f:selectItem itemValue="false" itemLabel="否" />
										<f:selectItem itemValue="true" itemLabel="是" />
									</h:selectOneMenu>
								</p:column>
							</p:row>
							<p:row rendered="#{(alarmMessageCheckController.alarmMsgCheck.msgType == 'tdyc_single' or alarmMessageCheckController.alarmMsgCheck.msgType == 'tdyc_double') and alarmMessageCheckController.alarmMsgCheck.id != null}" >
								<p:column>
									<h:outputLabel value="通讯网管" />
								</p:column>
								<p:column colspan="3">
									<h:outputText escape="false" value="#{alarmMessageCheckController.getChannelAlarm(alarmMessageCheckController.alarmMsgCheck)}" />
								</p:column>
							</p:row>
						</p:panelGrid>
					</p:outputPanel>
					<p:outputPanel style="width:100%;" rendered="#{alarmMessageCheckController.selectedChecks.size()>1}">
						<p:panelGrid style="width:100%">
							<p:row>
								<p:column>
									<h:outputLabel value="检查结果:" />
								</p:column>
								<p:column colspan="4">
									<h:inputTextarea label="content" value="#{alarmMessageCheckController.alarmMsgCheck.checkResult}"
										rows="5" style="width:100%"/>
								</p:column>
							</p:row>
							<p:row>
								<p:column>
									<h:outputLabel value="检查时间" />
								</p:column>
								<p:column>
									<p:calendar value="#{alarmMessageCheckController.alarmMsgCheck.checkTime}" navigator="true"
										pattern="yyyy-MM-dd HH:mm:ss" />
								</p:column>
								<p:column>
									<h:outputLabel value="检查人员:" />
								</p:column>
								<p:column>
									<p:inputText value="#{alarmMessageCheckController.alarmMsgCheck.checker}"/>
								</p:column>
							</p:row>
							<p:row>
								<p:column>
									<h:outputLabel value="是否确认：" />
								</p:column>
								<p:column>
									<h:selectOneMenu value="#{alarmMessageCheckController.alarmMsgCheck.isChecked}" 
										style="width:180px;margin-right:20px;height:30px">
										<f:selectItem itemValue="false" itemLabel="否" />
										<f:selectItem itemValue="true" itemLabel="是" />
									</h:selectOneMenu>
								</p:column>
							</p:row>
						</p:panelGrid>
					</p:outputPanel>
				</p:dialog>
			</h:form>
			<!-- 选择一次设备 -->
			<h:form id="primaryForm">
				<p:dialog widgetVar="primaryDialog" header="关联一次设备" modal="true" id="primaryDialog" width="450" height="650">
					<p:toolbar>
						<f:facet name="left">
							<p:commandButton value="确定" icon="ui-icon-disk" id="primaryBtn"
								oncomplete="PF('primaryDialog').hide()" update="editForm:primary_id editForm:secondary_id editForm:content_id"
								actionListener="#{alarmMessageCheckController.savePrimary()}"
								disabled="#{alarmMessageCheckController.primarySelectedNode==null}" />
							<p:commandButton icon="ui-icon-cancel" value="关闭" type="button"
								onclick="PF('primaryDialog').hide()" style="margin-left:5px" />
						</f:facet>
					</p:toolbar>
					<p:tree value="#{alarmMessageCheckController.primaryRoot}" var="node" dynamic="true"
						selectionMode="single" id="primaryTree" widgetVar="primaryTree"
						animate="true" style="border:0">
						<p:ajax event="expand" update="primaryTree" listener="#{alarmMessageCheckController.onPrimaryNodeExpand}" />
						<p:ajax event="select" update="primaryForm:primaryBtn" listener="#{alarmMessageCheckController.onPrimaryNodeSelect}" />
						<p:treeNode type="station" icon="fa fa-home">
							<h:outputText value="#{node}" />
						</p:treeNode>
						<p:treeNode type="equipment">
							<h:outputText value="#{node}" />
						</p:treeNode>
						<p:treeNode type="type" icon="fa fa-home">
							<h:outputText value="#{node}" />
						</p:treeNode>
					</p:tree>
				</p:dialog>
			</h:form>
			<!-- 选择二次设备 -->
			<h:form id="secondaryForm">
				<p:dialog widgetVar="secondaryDialog" header="关联二次设备" modal="true" id="secondaryDialog" width="450" height="650">
					<p:toolbar>
						<f:facet name="left">
							<p:commandButton value="确定" icon="ui-icon-disk" id="secondaryBtn"
								oncomplete="PF('secondaryDialog').hide()" update="editForm:secondary_id editForm:content_id"
								actionListener="#{alarmMessageCheckController.saveSecondary()}" 
								disabled="#{alarmMessageCheckController.secondarySelectedNode==null}" />
							<p:commandButton icon="ui-icon-cancel" value="关闭" type="button"
								onclick="PF('secondaryDialog').hide()" style="margin-left:5px" />
						</f:facet>
					</p:toolbar>
					<p:tree value="#{alarmMessageCheckController.secondaryRoot}" var="node" dynamic="true"
						selectionMode="single" id="secondaryTree" widgetVar="secondaryTree"
						animate="true" style="border:0">
						<p:ajax event="expand" update="secondaryTree" listener="#{alarmMessageCheckController.onSecondaryNodeExpand}" />
						<p:ajax event="select" update="secondaryForm:secondaryBtn" listener="#{alarmMessageCheckController.onSecondaryNodeSelect}" />
						<p:treeNode type="station" icon="fa fa-home">
							<h:outputText value="#{node}" />
						</p:treeNode>
						<p:treeNode type="equipment">
							<h:outputText value="#{node}" />
						</p:treeNode>
						<p:treeNode type="type" icon="fa fa-home">
							<h:outputText value="#{node}" />
						</p:treeNode>
					</p:tree>
				</p:dialog>
			</h:form>
		</div>
		<div class="box box-warning" id="detailDiv" style="display:none">
			<div class="box-header with-border">
				<h3 class="box-title">详细信息</h3>
				<div class="box-tools pull-right">
					<button type="button" class="btn btn-box-tool" onclick="hideReturnBtn()"><i class="fa fa-times"/></button>
				</div>
			</div>
			<div class="box-body">
				<iframe id="detailPage" style="width:100%;height:600px" frameborder="0" />
			</div>
		</div>
	</ui:define>
	<ui:define name="contentend">
		<script src="/ui/map/dialog/riskAlarmDialog/searchAlarmMsgDlg.js?version=1.0"/>
		<script src="/resources/js/tables/singleScrollTable.js"/>
		<script>
			function downloadFunc() {
				debugger;
				var file = document.getElementById("downloadForm:fileExist");
				if (file.innerHTML == 'true') {
					document.getElementById("downloadForm:downloadBtn").click();
				}
			}
			
			function upLoadFile() {
				PF('fileUpLoadDlg').hide();
				getTableScrollHeight();
			}
			
			function afterCreate() {
				PF('editDlg').hide();
				getTableScrollHeight();
			}
		</script>
	</ui:define>
</ui:composition>